package cn.cmm;

import java.util.Scanner;

/**
 * Created by Lenovo on 2019/1/6.
 */
public class Person {
   private String names="";

    public String getNames() {
        return names;
    }

    public void setNames(String names) {
        this.names = names;
    }

    static Scanner input = new Scanner(System.in);
    public int showInfo(){
        int num;
        do {
            System.out.println("请出拳:1.剪刀2.石头3.布(输入相应的数字)");
            num = input.nextInt();
            switch (num) {
                case 1:
                    System.out.println("你出拳:剪刀");
                    break;
                case 2:
                    System.out.println("你出拳:石头");
                    break;
                case 3:
                    System.out.println("你出拳:布");
                    break;
                default:
                    System.out.println("输入错误,请重新输入！");
                    continue;
            }
            break;
        }while (true);
        return num;
    }
}
